<html><body>
<style>

body, h1, h2, h3, div, span, p, pre, a {
  margin: 0;
  padding: 0;
  border: 0;
  font-weight: inherit;
  font-style: inherit;
  font-size: 100%;
  font-family: inherit;
  vertical-align: baseline;
}

body {
  font-size: 13px;
  padding: 1em;
}

h1 {
  font-size: 26px;
  margin-bottom: 1em;
}

h2 {
  font-size: 24px;
  margin-bottom: 1em;
}

h3 {
  font-size: 20px;
  margin-bottom: 1em;
  margin-top: 1em;
}

pre, code {
  line-height: 1.5;
  font-family: Monaco, 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Lucida Console', monospace;
}

pre {
  margin-top: 0.5em;
}

h1, h2, h3, p {
  font-family: Arial, sans serif;
}

h1, h2, h3 {
  border-bottom: solid #CCC 1px;
}

.toc_element {
  margin-top: 0.5em;
}

.firstline {
  margin-left: 2 em;
}

.method  {
  margin-top: 1em;
  border: solid 1px #CCC;
  padding: 1em;
  background: #EEE;
}

.details {
  font-weight: bold;
  font-size: 14px;
}

</style>

<h1><a href="firestore_v1.html">Cloud Firestore API</a> . <a href="firestore_v1.projects.html">projects</a> . <a href="firestore_v1.projects.databases.html">databases</a></h1>
<h2>Instance Methods</h2>
<p class="toc_element">
  <code><a href="firestore_v1.projects.databases.backupSchedules.html">backupSchedules()</a></code>
</p>
<p class="firstline">Returns the backupSchedules Resource.</p>

<p class="toc_element">
  <code><a href="firestore_v1.projects.databases.collectionGroups.html">collectionGroups()</a></code>
</p>
<p class="firstline">Returns the collectionGroups Resource.</p>

<p class="toc_element">
  <code><a href="firestore_v1.projects.databases.documents.html">documents()</a></code>
</p>
<p class="firstline">Returns the documents Resource.</p>

<p class="toc_element">
  <code><a href="firestore_v1.projects.databases.operations.html">operations()</a></code>
</p>
<p class="firstline">Returns the operations Resource.</p>

<p class="toc_element">
  <code><a href="firestore_v1.projects.databases.userCreds.html">userCreds()</a></code>
</p>
<p class="firstline">Returns the userCreds Resource.</p>

<p class="toc_element">
  <code><a href="#bulkDeleteDocuments">bulkDeleteDocuments(name, body=None, x__xgafv=None)</a></code></p>
<p class="firstline">Bulk deletes a subset of documents from Google Cloud Firestore. Documents created or updated after the underlying system starts to process the request will not be deleted. The bulk delete occurs in the background and its progress can be monitored and managed via the Operation resource that is created. For more details on bulk delete behavior, refer to: https://cloud.google.com/firestore/docs/manage-data/bulk-delete</p>
<p class="toc_element">
  <code><a href="#clone">clone(parent, body=None, x__xgafv=None)</a></code></p>
<p class="firstline">Creates a new database by cloning an existing one. The new database must be in the same cloud region or multi-region location as the existing database. This behaves similar to FirestoreAdmin.CreateDatabase except instead of creating a new empty database, a new database is created with the database type, index configuration, and documents from an existing database. The long-running operation can be used to track the progress of the clone, with the Operation's metadata field type being the CloneDatabaseMetadata. The response type is the Database if the clone was successful. The new database is not readable or writeable until the LRO has completed.</p>
<p class="toc_element">
  <code><a href="#close">close()</a></code></p>
<p class="firstline">Close httplib2 connections.</p>
<p class="toc_element">
  <code><a href="#create">create(parent, body=None, databaseId=None, x__xgafv=None)</a></code></p>
<p class="firstline">Create a database.</p>
<p class="toc_element">
  <code><a href="#delete">delete(name, etag=None, x__xgafv=None)</a></code></p>
<p class="firstline">Deletes a database.</p>
<p class="toc_element">
  <code><a href="#exportDocuments">exportDocuments(name, body=None, x__xgafv=None)</a></code></p>
<p class="firstline">Exports a copy of all or a subset of documents from Google Cloud Firestore to another storage system, such as Google Cloud Storage. Recent updates to documents may not be reflected in the export. The export occurs in the background and its progress can be monitored and managed via the Operation resource that is created. The output of an export may only be used once the associated operation is done. If an export operation is cancelled before completion it may leave partial data behind in Google Cloud Storage. For more details on export behavior and output format, refer to: https://cloud.google.com/firestore/docs/manage-data/export-import</p>
<p class="toc_element">
  <code><a href="#get">get(name, x__xgafv=None)</a></code></p>
<p class="firstline">Gets information about a database.</p>
<p class="toc_element">
  <code><a href="#importDocuments">importDocuments(name, body=None, x__xgafv=None)</a></code></p>
<p class="firstline">Imports documents into Google Cloud Firestore. Existing documents with the same name are overwritten. The import occurs in the background and its progress can be monitored and managed via the Operation resource that is created. If an ImportDocuments operation is cancelled, it is possible that a subset of the data has already been imported to Cloud Firestore.</p>
<p class="toc_element">
  <code><a href="#list">list(parent, showDeleted=None, x__xgafv=None)</a></code></p>
<p class="firstline">List all the databases in the project.</p>
<p class="toc_element">
  <code><a href="#patch">patch(name, body=None, updateMask=None, x__xgafv=None)</a></code></p>
<p class="firstline">Updates a database.</p>
<p class="toc_element">
  <code><a href="#restore">restore(parent, body=None, x__xgafv=None)</a></code></p>
<p class="firstline">Creates a new database by restoring from an existing backup. The new database must be in the same cloud region or multi-region location as the existing backup. This behaves similar to FirestoreAdmin.CreateDatabase except instead of creating a new empty database, a new database is created with the database type, index configuration, and documents from an existing backup. The long-running operation can be used to track the progress of the restore, with the Operation's metadata field type being the RestoreDatabaseMetadata. The response type is the Database if the restore was successful. The new database is not readable or writeable until the LRO has completed.</p>
<h3>Method Details</h3>
<div class="method">
    <code class="details" id="bulkDeleteDocuments">bulkDeleteDocuments(name, body=None, x__xgafv=None)</code>
  <pre>Bulk deletes a subset of documents from Google Cloud Firestore. Documents created or updated after the underlying system starts to process the request will not be deleted. The bulk delete occurs in the background and its progress can be monitored and managed via the Operation resource that is created. For more details on bulk delete behavior, refer to: https://cloud.google.com/firestore/docs/manage-data/bulk-delete

Args:
  name: string, Required. Database to operate. Should be of the form: `projects/{project_id}/databases/{database_id}`. (required)
  body: object, The request body.
    The object takes the form of:

{ # The request for FirestoreAdmin.BulkDeleteDocuments. When both collection_ids and namespace_ids are set, only documents satisfying both conditions will be deleted. Requests with namespace_ids and collection_ids both empty will be rejected. Please use FirestoreAdmin.DeleteDatabase instead.
  &quot;collectionIds&quot;: [ # Optional. IDs of the collection groups to delete. Unspecified means all collection groups. Each collection group in this list must be unique.
    &quot;A String&quot;,
  ],
  &quot;namespaceIds&quot;: [ # Optional. Namespaces to delete. An empty list means all namespaces. This is the recommended usage for databases that don&#x27;t use namespaces. An empty string element represents the default namespace. This should be used if the database has data in non-default namespaces, but doesn&#x27;t want to delete from them. Each namespace in this list must be unique.
    &quot;A String&quot;,
  ],
}

  x__xgafv: string, V1 error format.
    Allowed values
      1 - v1 error format
      2 - v2 error format

Returns:
  An object of the form:

    { # This resource represents a long-running operation that is the result of a network API call.
  &quot;done&quot;: True or False, # If the value is `false`, it means the operation is still in progress. If `true`, the operation is completed, and either `error` or `response` is available.
  &quot;error&quot;: { # The `Status` type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by [gRPC](https://github.com/grpc). Each `Status` message contains three pieces of data: error code, error message, and error details. You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors). # The error result of the operation in case of failure or cancellation.
    &quot;code&quot;: 42, # The status code, which should be an enum value of google.rpc.Code.
    &quot;details&quot;: [ # A list of messages that carry the error details. There is a common set of message types for APIs to use.
      {
        &quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
      },
    ],
    &quot;message&quot;: &quot;A String&quot;, # A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the google.rpc.Status.details field, or localized by the client.
  },
  &quot;metadata&quot;: { # Service-specific metadata associated with the operation. It typically contains progress information and common metadata such as create time. Some services might not provide such metadata. Any method that returns a long-running operation should document the metadata type, if any.
    &quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
  },
  &quot;name&quot;: &quot;A String&quot;, # The server-assigned name, which is only unique within the same service that originally returns it. If you use the default HTTP mapping, the `name` should be a resource name ending with `operations/{unique_id}`.
  &quot;response&quot;: { # The normal, successful response of the operation. If the original method returns no data on success, such as `Delete`, the response is `google.protobuf.Empty`. If the original method is standard `Get`/`Create`/`Update`, the response should be the resource. For other methods, the response should have the type `XxxResponse`, where `Xxx` is the original method name. For example, if the original method name is `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`.
    &quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
  },
}</pre>
</div>

<div class="method">
    <code class="details" id="clone">clone(parent, body=None, x__xgafv=None)</code>
  <pre>Creates a new database by cloning an existing one. The new database must be in the same cloud region or multi-region location as the existing database. This behaves similar to FirestoreAdmin.CreateDatabase except instead of creating a new empty database, a new database is created with the database type, index configuration, and documents from an existing database. The long-running operation can be used to track the progress of the clone, with the Operation&#x27;s metadata field type being the CloneDatabaseMetadata. The response type is the Database if the clone was successful. The new database is not readable or writeable until the LRO has completed.

Args:
  parent: string, Required. The project to clone the database in. Format is `projects/{project_id}`. (required)
  body: object, The request body.
    The object takes the form of:

{ # The request message for FirestoreAdmin.CloneDatabase.
  &quot;databaseId&quot;: &quot;A String&quot;, # Required. The ID to use for the database, which will become the final component of the database&#x27;s resource name. This database ID must not be associated with an existing database. This value should be 4-63 characters. Valid characters are /a-z-/ with first character a letter and the last a letter or a number. Must not be UUID-like /[0-9a-f]{8}(-[0-9a-f]{4}){3}-[0-9a-f]{12}/. &quot;(default)&quot; database ID is also valid if the database is Standard edition.
  &quot;encryptionConfig&quot;: { # Encryption configuration for a new database being created from another source. The source could be a Backup . # Optional. Encryption configuration for the cloned database. If this field is not specified, the cloned database will use the same encryption configuration as the source database, namely use_source_encryption.
    &quot;customerManagedEncryption&quot;: { # The configuration options for using CMEK (Customer Managed Encryption Key) encryption. # Use Customer Managed Encryption Keys (CMEK) for encryption.
      &quot;kmsKeyName&quot;: &quot;A String&quot;, # Required. Only keys in the same location as the database are allowed to be used for encryption. For Firestore&#x27;s nam5 multi-region, this corresponds to Cloud KMS multi-region us. For Firestore&#x27;s eur3 multi-region, this corresponds to Cloud KMS multi-region europe. See https://cloud.google.com/kms/docs/locations. The expected format is `projects/{project_id}/locations/{kms_location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}`.
    },
    &quot;googleDefaultEncryption&quot;: { # The configuration options for using Google default encryption. # Use Google default encryption.
    },
    &quot;useSourceEncryption&quot;: { # The configuration options for using the same encryption method as the source. # The database will use the same encryption configuration as the source.
    },
  },
  &quot;pitrSnapshot&quot;: { # A consistent snapshot of a database at a specific point in time. A PITR (Point-in-time recovery) snapshot with previous versions of a database&#x27;s data is available for every minute up to the associated database&#x27;s data retention period. If the PITR feature is enabled, the retention period is 7 days; otherwise, it is one hour. # Required. Specification of the PITR data to clone from. The source database must exist. The cloned database will be created in the same location as the source database.
    &quot;database&quot;: &quot;A String&quot;, # Required. The name of the database that this was a snapshot of. Format: `projects/{project}/databases/{database}`.
    &quot;databaseUid&quot;: &quot;A String&quot;, # Output only. Public UUID of the database the snapshot was associated with.
    &quot;snapshotTime&quot;: &quot;A String&quot;, # Required. Snapshot time of the database.
  },
  &quot;tags&quot;: { # Optional. Immutable. Tags to be bound to the cloned database. The tags should be provided in the format of `tagKeys/{tag_key_id} -&gt; tagValues/{tag_value_id}`.
    &quot;a_key&quot;: &quot;A String&quot;,
  },
}

  x__xgafv: string, V1 error format.
    Allowed values
      1 - v1 error format
      2 - v2 error format

Returns:
  An object of the form:

    { # This resource represents a long-running operation that is the result of a network API call.
  &quot;done&quot;: True or False, # If the value is `false`, it means the operation is still in progress. If `true`, the operation is completed, and either `error` or `response` is available.
  &quot;error&quot;: { # The `Status` type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by [gRPC](https://github.com/grpc). Each `Status` message contains three pieces of data: error code, error message, and error details. You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors). # The error result of the operation in case of failure or cancellation.
    &quot;code&quot;: 42, # The status code, which should be an enum value of google.rpc.Code.
    &quot;details&quot;: [ # A list of messages that carry the error details. There is a common set of message types for APIs to use.
      {
        &quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
      },
    ],
    &quot;message&quot;: &quot;A String&quot;, # A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the google.rpc.Status.details field, or localized by the client.
  },
  &quot;metadata&quot;: { # Service-specific metadata associated with the operation. It typically contains progress information and common metadata such as create time. Some services might not provide such metadata. Any method that returns a long-running operation should document the metadata type, if any.
    &quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
  },
  &quot;name&quot;: &quot;A String&quot;, # The server-assigned name, which is only unique within the same service that originally returns it. If you use the default HTTP mapping, the `name` should be a resource name ending with `operations/{unique_id}`.
  &quot;response&quot;: { # The normal, successful response of the operation. If the original method returns no data on success, such as `Delete`, the response is `google.protobuf.Empty`. If the original method is standard `Get`/`Create`/`Update`, the response should be the resource. For other methods, the response should have the type `XxxResponse`, where `Xxx` is the original method name. For example, if the original method name is `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`.
    &quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
  },
}</pre>
</div>

<div class="method">
    <code class="details" id="close">close()</code>
  <pre>Close httplib2 connections.</pre>
</div>

<div class="method">
    <code class="details" id="create">create(parent, body=None, databaseId=None, x__xgafv=None)</code>
  <pre>Create a database.

Args:
  parent: string, Required. A parent name of the form `projects/{project_id}` (required)
  body: object, The request body.
    The object takes the form of:

{ # A Cloud Firestore Database.
  &quot;appEngineIntegrationMode&quot;: &quot;A String&quot;, # The App Engine integration mode to use for this database.
  &quot;cmekConfig&quot;: { # The CMEK (Customer Managed Encryption Key) configuration for a Firestore database. If not present, the database is secured by the default Google encryption key. # Optional. Presence indicates CMEK is enabled for this database.
    &quot;activeKeyVersion&quot;: [ # Output only. Currently in-use [KMS key versions](https://cloud.google.com/kms/docs/resource-hierarchy#key_versions). During [key rotation](https://cloud.google.com/kms/docs/key-rotation), there can be multiple in-use key versions. The expected format is `projects/{project_id}/locations/{kms_location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}/cryptoKeyVersions/{key_version}`.
      &quot;A String&quot;,
    ],
    &quot;kmsKeyName&quot;: &quot;A String&quot;, # Required. Only keys in the same location as this database are allowed to be used for encryption. For Firestore&#x27;s nam5 multi-region, this corresponds to Cloud KMS multi-region us. For Firestore&#x27;s eur3 multi-region, this corresponds to Cloud KMS multi-region europe. See https://cloud.google.com/kms/docs/locations. The expected format is `projects/{project_id}/locations/{kms_location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}`.
  },
  &quot;concurrencyMode&quot;: &quot;A String&quot;, # The concurrency control mode to use for this database.
  &quot;createTime&quot;: &quot;A String&quot;, # Output only. The timestamp at which this database was created. Databases created before 2016 do not populate create_time.
  &quot;databaseEdition&quot;: &quot;A String&quot;, # Immutable. The edition of the database.
  &quot;deleteProtectionState&quot;: &quot;A String&quot;, # State of delete protection for the database.
  &quot;deleteTime&quot;: &quot;A String&quot;, # Output only. The timestamp at which this database was deleted. Only set if the database has been deleted.
  &quot;earliestVersionTime&quot;: &quot;A String&quot;, # Output only. The earliest timestamp at which older versions of the data can be read from the database. See [version_retention_period] above; this field is populated with `now - version_retention_period`. This value is continuously updated, and becomes stale the moment it is queried. If you are using this value to recover data, make sure to account for the time from the moment when the value is queried to the moment when you initiate the recovery.
  &quot;etag&quot;: &quot;A String&quot;, # This checksum is computed by the server based on the value of other fields, and may be sent on update and delete requests to ensure the client has an up-to-date value before proceeding.
  &quot;firestoreDataAccessMode&quot;: &quot;A String&quot;, # Optional. The Firestore API data access mode to use for this database. If not set on write: - the default value is DATA_ACCESS_MODE_DISABLED for Enterprise Edition. - the default value is DATA_ACCESS_MODE_ENABLED for Standard Edition.
  &quot;freeTier&quot;: True or False, # Output only. Background: Free tier is the ability of a Firestore database to use a small amount of resources every day without being charged. Once usage exceeds the free tier limit further usage is charged. Whether this database can make use of the free tier. Only one database per project can be eligible for the free tier. The first (or next) database that is created in a project without a free tier database will be marked as eligible for the free tier. Databases that are created while there is a free tier database will not be eligible for the free tier.
  &quot;keyPrefix&quot;: &quot;A String&quot;, # Output only. The key_prefix for this database. This key_prefix is used, in combination with the project ID (&quot;~&quot;) to construct the application ID that is returned from the Cloud Datastore APIs in Google App Engine first generation runtimes. This value may be empty in which case the appid to use for URL-encoded keys is the project_id (eg: foo instead of v~foo).
  &quot;locationId&quot;: &quot;A String&quot;, # The location of the database. Available locations are listed at https://cloud.google.com/firestore/docs/locations.
  &quot;mongodbCompatibleDataAccessMode&quot;: &quot;A String&quot;, # Optional. The MongoDB compatible API data access mode to use for this database. If not set on write, the default value is DATA_ACCESS_MODE_ENABLED for Enterprise Edition. The value is always DATA_ACCESS_MODE_DISABLED for Standard Edition.
  &quot;name&quot;: &quot;A String&quot;, # The resource name of the Database. Format: `projects/{project}/databases/{database}`
  &quot;pointInTimeRecoveryEnablement&quot;: &quot;A String&quot;, # Whether to enable the PITR feature on this database.
  &quot;previousId&quot;: &quot;A String&quot;, # Output only. The database resource&#x27;s prior database ID. This field is only populated for deleted databases.
  &quot;realtimeUpdatesMode&quot;: &quot;A String&quot;, # Immutable. The default Realtime Updates mode to use for this database.
  &quot;sourceInfo&quot;: { # Information about the provenance of this database. # Output only. Information about the provenance of this database.
    &quot;backup&quot;: { # Information about a backup that was used to restore a database. # If set, this database was restored from the specified backup (or a snapshot thereof).
      &quot;backup&quot;: &quot;A String&quot;, # The resource name of the backup that was used to restore this database. Format: `projects/{project}/locations/{location}/backups/{backup}`.
    },
    &quot;operation&quot;: &quot;A String&quot;, # The associated long-running operation. This field may not be set after the operation has completed. Format: `projects/{project}/databases/{database}/operations/{operation}`.
  },
  &quot;tags&quot;: { # Optional. Input only. Immutable. Tag keys/values directly bound to this resource. For example: &quot;123/environment&quot;: &quot;production&quot;, &quot;123/costCenter&quot;: &quot;marketing&quot;
    &quot;a_key&quot;: &quot;A String&quot;,
  },
  &quot;type&quot;: &quot;A String&quot;, # The type of the database. See https://cloud.google.com/datastore/docs/firestore-or-datastore for information about how to choose.
  &quot;uid&quot;: &quot;A String&quot;, # Output only. The system-generated UUID4 for this Database.
  &quot;updateTime&quot;: &quot;A String&quot;, # Output only. The timestamp at which this database was most recently updated. Note this only includes updates to the database resource and not data contained by the database.
  &quot;versionRetentionPeriod&quot;: &quot;A String&quot;, # Output only. The period during which past versions of data are retained in the database. Any read or query can specify a `read_time` within this window, and will read the state of the database at that time. If the PITR feature is enabled, the retention period is 7 days. Otherwise, the retention period is 1 hour.
}

  databaseId: string, Required. The ID to use for the database, which will become the final component of the database&#x27;s resource name. This value should be 4-63 characters. Valid characters are /a-z-/ with first character a letter and the last a letter or a number. Must not be UUID-like /[0-9a-f]{8}(-[0-9a-f]{4}){3}-[0-9a-f]{12}/. &quot;(default)&quot; database ID is also valid if the database is Standard edition.
  x__xgafv: string, V1 error format.
    Allowed values
      1 - v1 error format
      2 - v2 error format

Returns:
  An object of the form:

    { # This resource represents a long-running operation that is the result of a network API call.
  &quot;done&quot;: True or False, # If the value is `false`, it means the operation is still in progress. If `true`, the operation is completed, and either `error` or `response` is available.
  &quot;error&quot;: { # The `Status` type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by [gRPC](https://github.com/grpc). Each `Status` message contains three pieces of data: error code, error message, and error details. You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors). # The error result of the operation in case of failure or cancellation.
    &quot;code&quot;: 42, # The status code, which should be an enum value of google.rpc.Code.
    &quot;details&quot;: [ # A list of messages that carry the error details. There is a common set of message types for APIs to use.
      {
        &quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
      },
    ],
    &quot;message&quot;: &quot;A String&quot;, # A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the google.rpc.Status.details field, or localized by the client.
  },
  &quot;metadata&quot;: { # Service-specific metadata associated with the operation. It typically contains progress information and common metadata such as create time. Some services might not provide such metadata. Any method that returns a long-running operation should document the metadata type, if any.
    &quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
  },
  &quot;name&quot;: &quot;A String&quot;, # The server-assigned name, which is only unique within the same service that originally returns it. If you use the default HTTP mapping, the `name` should be a resource name ending with `operations/{unique_id}`.
  &quot;response&quot;: { # The normal, successful response of the operation. If the original method returns no data on success, such as `Delete`, the response is `google.protobuf.Empty`. If the original method is standard `Get`/`Create`/`Update`, the response should be the resource. For other methods, the response should have the type `XxxResponse`, where `Xxx` is the original method name. For example, if the original method name is `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`.
    &quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
  },
}</pre>
</div>

<div class="method">
    <code class="details" id="delete">delete(name, etag=None, x__xgafv=None)</code>
  <pre>Deletes a database.

Args:
  name: string, Required. A name of the form `projects/{project_id}/databases/{database_id}` (required)
  etag: string, The current etag of the Database. If an etag is provided and does not match the current etag of the database, deletion will be blocked and a FAILED_PRECONDITION error will be returned.
  x__xgafv: string, V1 error format.
    Allowed values
      1 - v1 error format
      2 - v2 error format

Returns:
  An object of the form:

    { # This resource represents a long-running operation that is the result of a network API call.
  &quot;done&quot;: True or False, # If the value is `false`, it means the operation is still in progress. If `true`, the operation is completed, and either `error` or `response` is available.
  &quot;error&quot;: { # The `Status` type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by [gRPC](https://github.com/grpc). Each `Status` message contains three pieces of data: error code, error message, and error details. You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors). # The error result of the operation in case of failure or cancellation.
    &quot;code&quot;: 42, # The status code, which should be an enum value of google.rpc.Code.
    &quot;details&quot;: [ # A list of messages that carry the error details. There is a common set of message types for APIs to use.
      {
        &quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
      },
    ],
    &quot;message&quot;: &quot;A String&quot;, # A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the google.rpc.Status.details field, or localized by the client.
  },
  &quot;metadata&quot;: { # Service-specific metadata associated with the operation. It typically contains progress information and common metadata such as create time. Some services might not provide such metadata. Any method that returns a long-running operation should document the metadata type, if any.
    &quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
  },
  &quot;name&quot;: &quot;A String&quot;, # The server-assigned name, which is only unique within the same service that originally returns it. If you use the default HTTP mapping, the `name` should be a resource name ending with `operations/{unique_id}`.
  &quot;response&quot;: { # The normal, successful response of the operation. If the original method returns no data on success, such as `Delete`, the response is `google.protobuf.Empty`. If the original method is standard `Get`/`Create`/`Update`, the response should be the resource. For other methods, the response should have the type `XxxResponse`, where `Xxx` is the original method name. For example, if the original method name is `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`.
    &quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
  },
}</pre>
</div>

<div class="method">
    <code class="details" id="exportDocuments">exportDocuments(name, body=None, x__xgafv=None)</code>
  <pre>Exports a copy of all or a subset of documents from Google Cloud Firestore to another storage system, such as Google Cloud Storage. Recent updates to documents may not be reflected in the export. The export occurs in the background and its progress can be monitored and managed via the Operation resource that is created. The output of an export may only be used once the associated operation is done. If an export operation is cancelled before completion it may leave partial data behind in Google Cloud Storage. For more details on export behavior and output format, refer to: https://cloud.google.com/firestore/docs/manage-data/export-import

Args:
  name: string, Required. Database to export. Should be of the form: `projects/{project_id}/databases/{database_id}`. (required)
  body: object, The request body.
    The object takes the form of:

{ # The request for FirestoreAdmin.ExportDocuments.
  &quot;collectionIds&quot;: [ # Which collection IDs to export. Unspecified means all collections. Each collection ID in this list must be unique.
    &quot;A String&quot;,
  ],
  &quot;namespaceIds&quot;: [ # An empty list represents all namespaces. This is the preferred usage for databases that don&#x27;t use namespaces. An empty string element represents the default namespace. This should be used if the database has data in non-default namespaces, but doesn&#x27;t want to include them. Each namespace in this list must be unique.
    &quot;A String&quot;,
  ],
  &quot;outputUriPrefix&quot;: &quot;A String&quot;, # The output URI. Currently only supports Google Cloud Storage URIs of the form: `gs://BUCKET_NAME[/NAMESPACE_PATH]`, where `BUCKET_NAME` is the name of the Google Cloud Storage bucket and `NAMESPACE_PATH` is an optional Google Cloud Storage namespace path. When choosing a name, be sure to consider Google Cloud Storage naming guidelines: https://cloud.google.com/storage/docs/naming. If the URI is a bucket (without a namespace path), a prefix will be generated based on the start time.
  &quot;snapshotTime&quot;: &quot;A String&quot;, # The timestamp that corresponds to the version of the database to be exported. The timestamp must be in the past, rounded to the minute and not older than earliestVersionTime. If specified, then the exported documents will represent a consistent view of the database at the provided time. Otherwise, there are no guarantees about the consistency of the exported documents.
}

  x__xgafv: string, V1 error format.
    Allowed values
      1 - v1 error format
      2 - v2 error format

Returns:
  An object of the form:

    { # This resource represents a long-running operation that is the result of a network API call.
  &quot;done&quot;: True or False, # If the value is `false`, it means the operation is still in progress. If `true`, the operation is completed, and either `error` or `response` is available.
  &quot;error&quot;: { # The `Status` type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by [gRPC](https://github.com/grpc). Each `Status` message contains three pieces of data: error code, error message, and error details. You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors). # The error result of the operation in case of failure or cancellation.
    &quot;code&quot;: 42, # The status code, which should be an enum value of google.rpc.Code.
    &quot;details&quot;: [ # A list of messages that carry the error details. There is a common set of message types for APIs to use.
      {
        &quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
      },
    ],
    &quot;message&quot;: &quot;A String&quot;, # A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the google.rpc.Status.details field, or localized by the client.
  },
  &quot;metadata&quot;: { # Service-specific metadata associated with the operation. It typically contains progress information and common metadata such as create time. Some services might not provide such metadata. Any method that returns a long-running operation should document the metadata type, if any.
    &quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
  },
  &quot;name&quot;: &quot;A String&quot;, # The server-assigned name, which is only unique within the same service that originally returns it. If you use the default HTTP mapping, the `name` should be a resource name ending with `operations/{unique_id}`.
  &quot;response&quot;: { # The normal, successful response of the operation. If the original method returns no data on success, such as `Delete`, the response is `google.protobuf.Empty`. If the original method is standard `Get`/`Create`/`Update`, the response should be the resource. For other methods, the response should have the type `XxxResponse`, where `Xxx` is the original method name. For example, if the original method name is `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`.
    &quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
  },
}</pre>
</div>

<div class="method">
    <code class="details" id="get">get(name, x__xgafv=None)</code>
  <pre>Gets information about a database.

Args:
  name: string, Required. A name of the form `projects/{project_id}/databases/{database_id}` (required)
  x__xgafv: string, V1 error format.
    Allowed values
      1 - v1 error format
      2 - v2 error format

Returns:
  An object of the form:

    { # A Cloud Firestore Database.
  &quot;appEngineIntegrationMode&quot;: &quot;A String&quot;, # The App Engine integration mode to use for this database.
  &quot;cmekConfig&quot;: { # The CMEK (Customer Managed Encryption Key) configuration for a Firestore database. If not present, the database is secured by the default Google encryption key. # Optional. Presence indicates CMEK is enabled for this database.
    &quot;activeKeyVersion&quot;: [ # Output only. Currently in-use [KMS key versions](https://cloud.google.com/kms/docs/resource-hierarchy#key_versions). During [key rotation](https://cloud.google.com/kms/docs/key-rotation), there can be multiple in-use key versions. The expected format is `projects/{project_id}/locations/{kms_location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}/cryptoKeyVersions/{key_version}`.
      &quot;A String&quot;,
    ],
    &quot;kmsKeyName&quot;: &quot;A String&quot;, # Required. Only keys in the same location as this database are allowed to be used for encryption. For Firestore&#x27;s nam5 multi-region, this corresponds to Cloud KMS multi-region us. For Firestore&#x27;s eur3 multi-region, this corresponds to Cloud KMS multi-region europe. See https://cloud.google.com/kms/docs/locations. The expected format is `projects/{project_id}/locations/{kms_location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}`.
  },
  &quot;concurrencyMode&quot;: &quot;A String&quot;, # The concurrency control mode to use for this database.
  &quot;createTime&quot;: &quot;A String&quot;, # Output only. The timestamp at which this database was created. Databases created before 2016 do not populate create_time.
  &quot;databaseEdition&quot;: &quot;A String&quot;, # Immutable. The edition of the database.
  &quot;deleteProtectionState&quot;: &quot;A String&quot;, # State of delete protection for the database.
  &quot;deleteTime&quot;: &quot;A String&quot;, # Output only. The timestamp at which this database was deleted. Only set if the database has been deleted.
  &quot;earliestVersionTime&quot;: &quot;A String&quot;, # Output only. The earliest timestamp at which older versions of the data can be read from the database. See [version_retention_period] above; this field is populated with `now - version_retention_period`. This value is continuously updated, and becomes stale the moment it is queried. If you are using this value to recover data, make sure to account for the time from the moment when the value is queried to the moment when you initiate the recovery.
  &quot;etag&quot;: &quot;A String&quot;, # This checksum is computed by the server based on the value of other fields, and may be sent on update and delete requests to ensure the client has an up-to-date value before proceeding.
  &quot;firestoreDataAccessMode&quot;: &quot;A String&quot;, # Optional. The Firestore API data access mode to use for this database. If not set on write: - the default value is DATA_ACCESS_MODE_DISABLED for Enterprise Edition. - the default value is DATA_ACCESS_MODE_ENABLED for Standard Edition.
  &quot;freeTier&quot;: True or False, # Output only. Background: Free tier is the ability of a Firestore database to use a small amount of resources every day without being charged. Once usage exceeds the free tier limit further usage is charged. Whether this database can make use of the free tier. Only one database per project can be eligible for the free tier. The first (or next) database that is created in a project without a free tier database will be marked as eligible for the free tier. Databases that are created while there is a free tier database will not be eligible for the free tier.
  &quot;keyPrefix&quot;: &quot;A String&quot;, # Output only. The key_prefix for this database. This key_prefix is used, in combination with the project ID (&quot;~&quot;) to construct the application ID that is returned from the Cloud Datastore APIs in Google App Engine first generation runtimes. This value may be empty in which case the appid to use for URL-encoded keys is the project_id (eg: foo instead of v~foo).
  &quot;locationId&quot;: &quot;A String&quot;, # The location of the database. Available locations are listed at https://cloud.google.com/firestore/docs/locations.
  &quot;mongodbCompatibleDataAccessMode&quot;: &quot;A String&quot;, # Optional. The MongoDB compatible API data access mode to use for this database. If not set on write, the default value is DATA_ACCESS_MODE_ENABLED for Enterprise Edition. The value is always DATA_ACCESS_MODE_DISABLED for Standard Edition.
  &quot;name&quot;: &quot;A String&quot;, # The resource name of the Database. Format: `projects/{project}/databases/{database}`
  &quot;pointInTimeRecoveryEnablement&quot;: &quot;A String&quot;, # Whether to enable the PITR feature on this database.
  &quot;previousId&quot;: &quot;A String&quot;, # Output only. The database resource&#x27;s prior database ID. This field is only populated for deleted databases.
  &quot;realtimeUpdatesMode&quot;: &quot;A String&quot;, # Immutable. The default Realtime Updates mode to use for this database.
  &quot;sourceInfo&quot;: { # Information about the provenance of this database. # Output only. Information about the provenance of this database.
    &quot;backup&quot;: { # Information about a backup that was used to restore a database. # If set, this database was restored from the specified backup (or a snapshot thereof).
      &quot;backup&quot;: &quot;A String&quot;, # The resource name of the backup that was used to restore this database. Format: `projects/{project}/locations/{location}/backups/{backup}`.
    },
    &quot;operation&quot;: &quot;A String&quot;, # The associated long-running operation. This field may not be set after the operation has completed. Format: `projects/{project}/databases/{database}/operations/{operation}`.
  },
  &quot;tags&quot;: { # Optional. Input only. Immutable. Tag keys/values directly bound to this resource. For example: &quot;123/environment&quot;: &quot;production&quot;, &quot;123/costCenter&quot;: &quot;marketing&quot;
    &quot;a_key&quot;: &quot;A String&quot;,
  },
  &quot;type&quot;: &quot;A String&quot;, # The type of the database. See https://cloud.google.com/datastore/docs/firestore-or-datastore for information about how to choose.
  &quot;uid&quot;: &quot;A String&quot;, # Output only. The system-generated UUID4 for this Database.
  &quot;updateTime&quot;: &quot;A String&quot;, # Output only. The timestamp at which this database was most recently updated. Note this only includes updates to the database resource and not data contained by the database.
  &quot;versionRetentionPeriod&quot;: &quot;A String&quot;, # Output only. The period during which past versions of data are retained in the database. Any read or query can specify a `read_time` within this window, and will read the state of the database at that time. If the PITR feature is enabled, the retention period is 7 days. Otherwise, the retention period is 1 hour.
}</pre>
</div>

<div class="method">
    <code class="details" id="importDocuments">importDocuments(name, body=None, x__xgafv=None)</code>
  <pre>Imports documents into Google Cloud Firestore. Existing documents with the same name are overwritten. The import occurs in the background and its progress can be monitored and managed via the Operation resource that is created. If an ImportDocuments operation is cancelled, it is possible that a subset of the data has already been imported to Cloud Firestore.

Args:
  name: string, Required. Database to import into. Should be of the form: `projects/{project_id}/databases/{database_id}`. (required)
  body: object, The request body.
    The object takes the form of:

{ # The request for FirestoreAdmin.ImportDocuments.
  &quot;collectionIds&quot;: [ # Which collection IDs to import. Unspecified means all collections included in the import. Each collection ID in this list must be unique.
    &quot;A String&quot;,
  ],
  &quot;inputUriPrefix&quot;: &quot;A String&quot;, # Location of the exported files. This must match the output_uri_prefix of an ExportDocumentsResponse from an export that has completed successfully. See: google.firestore.admin.v1.ExportDocumentsResponse.output_uri_prefix.
  &quot;namespaceIds&quot;: [ # An empty list represents all namespaces. This is the preferred usage for databases that don&#x27;t use namespaces. An empty string element represents the default namespace. This should be used if the database has data in non-default namespaces, but doesn&#x27;t want to include them. Each namespace in this list must be unique.
    &quot;A String&quot;,
  ],
}

  x__xgafv: string, V1 error format.
    Allowed values
      1 - v1 error format
      2 - v2 error format

Returns:
  An object of the form:

    { # This resource represents a long-running operation that is the result of a network API call.
  &quot;done&quot;: True or False, # If the value is `false`, it means the operation is still in progress. If `true`, the operation is completed, and either `error` or `response` is available.
  &quot;error&quot;: { # The `Status` type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by [gRPC](https://github.com/grpc). Each `Status` message contains three pieces of data: error code, error message, and error details. You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors). # The error result of the operation in case of failure or cancellation.
    &quot;code&quot;: 42, # The status code, which should be an enum value of google.rpc.Code.
    &quot;details&quot;: [ # A list of messages that carry the error details. There is a common set of message types for APIs to use.
      {
        &quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
      },
    ],
    &quot;message&quot;: &quot;A String&quot;, # A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the google.rpc.Status.details field, or localized by the client.
  },
  &quot;metadata&quot;: { # Service-specific metadata associated with the operation. It typically contains progress information and common metadata such as create time. Some services might not provide such metadata. Any method that returns a long-running operation should document the metadata type, if any.
    &quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
  },
  &quot;name&quot;: &quot;A String&quot;, # The server-assigned name, which is only unique within the same service that originally returns it. If you use the default HTTP mapping, the `name` should be a resource name ending with `operations/{unique_id}`.
  &quot;response&quot;: { # The normal, successful response of the operation. If the original method returns no data on success, such as `Delete`, the response is `google.protobuf.Empty`. If the original method is standard `Get`/`Create`/`Update`, the response should be the resource. For other methods, the response should have the type `XxxResponse`, where `Xxx` is the original method name. For example, if the original method name is `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`.
    &quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
  },
}</pre>
</div>

<div class="method">
    <code class="details" id="list">list(parent, showDeleted=None, x__xgafv=None)</code>
  <pre>List all the databases in the project.

Args:
  parent: string, Required. A parent name of the form `projects/{project_id}` (required)
  showDeleted: boolean, If true, also returns deleted resources.
  x__xgafv: string, V1 error format.
    Allowed values
      1 - v1 error format
      2 - v2 error format

Returns:
  An object of the form:

    { # The list of databases for a project.
  &quot;databases&quot;: [ # The databases in the project.
    { # A Cloud Firestore Database.
      &quot;appEngineIntegrationMode&quot;: &quot;A String&quot;, # The App Engine integration mode to use for this database.
      &quot;cmekConfig&quot;: { # The CMEK (Customer Managed Encryption Key) configuration for a Firestore database. If not present, the database is secured by the default Google encryption key. # Optional. Presence indicates CMEK is enabled for this database.
        &quot;activeKeyVersion&quot;: [ # Output only. Currently in-use [KMS key versions](https://cloud.google.com/kms/docs/resource-hierarchy#key_versions). During [key rotation](https://cloud.google.com/kms/docs/key-rotation), there can be multiple in-use key versions. The expected format is `projects/{project_id}/locations/{kms_location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}/cryptoKeyVersions/{key_version}`.
          &quot;A String&quot;,
        ],
        &quot;kmsKeyName&quot;: &quot;A String&quot;, # Required. Only keys in the same location as this database are allowed to be used for encryption. For Firestore&#x27;s nam5 multi-region, this corresponds to Cloud KMS multi-region us. For Firestore&#x27;s eur3 multi-region, this corresponds to Cloud KMS multi-region europe. See https://cloud.google.com/kms/docs/locations. The expected format is `projects/{project_id}/locations/{kms_location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}`.
      },
      &quot;concurrencyMode&quot;: &quot;A String&quot;, # The concurrency control mode to use for this database.
      &quot;createTime&quot;: &quot;A String&quot;, # Output only. The timestamp at which this database was created. Databases created before 2016 do not populate create_time.
      &quot;databaseEdition&quot;: &quot;A String&quot;, # Immutable. The edition of the database.
      &quot;deleteProtectionState&quot;: &quot;A String&quot;, # State of delete protection for the database.
      &quot;deleteTime&quot;: &quot;A String&quot;, # Output only. The timestamp at which this database was deleted. Only set if the database has been deleted.
      &quot;earliestVersionTime&quot;: &quot;A String&quot;, # Output only. The earliest timestamp at which older versions of the data can be read from the database. See [version_retention_period] above; this field is populated with `now - version_retention_period`. This value is continuously updated, and becomes stale the moment it is queried. If you are using this value to recover data, make sure to account for the time from the moment when the value is queried to the moment when you initiate the recovery.
      &quot;etag&quot;: &quot;A String&quot;, # This checksum is computed by the server based on the value of other fields, and may be sent on update and delete requests to ensure the client has an up-to-date value before proceeding.
      &quot;firestoreDataAccessMode&quot;: &quot;A String&quot;, # Optional. The Firestore API data access mode to use for this database. If not set on write: - the default value is DATA_ACCESS_MODE_DISABLED for Enterprise Edition. - the default value is DATA_ACCESS_MODE_ENABLED for Standard Edition.
      &quot;freeTier&quot;: True or False, # Output only. Background: Free tier is the ability of a Firestore database to use a small amount of resources every day without being charged. Once usage exceeds the free tier limit further usage is charged. Whether this database can make use of the free tier. Only one database per project can be eligible for the free tier. The first (or next) database that is created in a project without a free tier database will be marked as eligible for the free tier. Databases that are created while there is a free tier database will not be eligible for the free tier.
      &quot;keyPrefix&quot;: &quot;A String&quot;, # Output only. The key_prefix for this database. This key_prefix is used, in combination with the project ID (&quot;~&quot;) to construct the application ID that is returned from the Cloud Datastore APIs in Google App Engine first generation runtimes. This value may be empty in which case the appid to use for URL-encoded keys is the project_id (eg: foo instead of v~foo).
      &quot;locationId&quot;: &quot;A String&quot;, # The location of the database. Available locations are listed at https://cloud.google.com/firestore/docs/locations.
      &quot;mongodbCompatibleDataAccessMode&quot;: &quot;A String&quot;, # Optional. The MongoDB compatible API data access mode to use for this database. If not set on write, the default value is DATA_ACCESS_MODE_ENABLED for Enterprise Edition. The value is always DATA_ACCESS_MODE_DISABLED for Standard Edition.
      &quot;name&quot;: &quot;A String&quot;, # The resource name of the Database. Format: `projects/{project}/databases/{database}`
      &quot;pointInTimeRecoveryEnablement&quot;: &quot;A String&quot;, # Whether to enable the PITR feature on this database.
      &quot;previousId&quot;: &quot;A String&quot;, # Output only. The database resource&#x27;s prior database ID. This field is only populated for deleted databases.
      &quot;realtimeUpdatesMode&quot;: &quot;A String&quot;, # Immutable. The default Realtime Updates mode to use for this database.
      &quot;sourceInfo&quot;: { # Information about the provenance of this database. # Output only. Information about the provenance of this database.
        &quot;backup&quot;: { # Information about a backup that was used to restore a database. # If set, this database was restored from the specified backup (or a snapshot thereof).
          &quot;backup&quot;: &quot;A String&quot;, # The resource name of the backup that was used to restore this database. Format: `projects/{project}/locations/{location}/backups/{backup}`.
        },
        &quot;operation&quot;: &quot;A String&quot;, # The associated long-running operation. This field may not be set after the operation has completed. Format: `projects/{project}/databases/{database}/operations/{operation}`.
      },
      &quot;tags&quot;: { # Optional. Input only. Immutable. Tag keys/values directly bound to this resource. For example: &quot;123/environment&quot;: &quot;production&quot;, &quot;123/costCenter&quot;: &quot;marketing&quot;
        &quot;a_key&quot;: &quot;A String&quot;,
      },
      &quot;type&quot;: &quot;A String&quot;, # The type of the database. See https://cloud.google.com/datastore/docs/firestore-or-datastore for information about how to choose.
      &quot;uid&quot;: &quot;A String&quot;, # Output only. The system-generated UUID4 for this Database.
      &quot;updateTime&quot;: &quot;A String&quot;, # Output only. The timestamp at which this database was most recently updated. Note this only includes updates to the database resource and not data contained by the database.
      &quot;versionRetentionPeriod&quot;: &quot;A String&quot;, # Output only. The period during which past versions of data are retained in the database. Any read or query can specify a `read_time` within this window, and will read the state of the database at that time. If the PITR feature is enabled, the retention period is 7 days. Otherwise, the retention period is 1 hour.
    },
  ],
  &quot;unreachable&quot;: [ # In the event that data about individual databases cannot be listed they will be recorded here. An example entry might be: projects/some_project/locations/some_location This can happen if the Cloud Region that the Database resides in is currently unavailable. In this case we can&#x27;t fetch all the details about the database. You may be able to get a more detailed error message (or possibly fetch the resource) by sending a &#x27;Get&#x27; request for the resource or a &#x27;List&#x27; request for the specific location.
    &quot;A String&quot;,
  ],
}</pre>
</div>

<div class="method">
    <code class="details" id="patch">patch(name, body=None, updateMask=None, x__xgafv=None)</code>
  <pre>Updates a database.

Args:
  name: string, The resource name of the Database. Format: `projects/{project}/databases/{database}` (required)
  body: object, The request body.
    The object takes the form of:

{ # A Cloud Firestore Database.
  &quot;appEngineIntegrationMode&quot;: &quot;A String&quot;, # The App Engine integration mode to use for this database.
  &quot;cmekConfig&quot;: { # The CMEK (Customer Managed Encryption Key) configuration for a Firestore database. If not present, the database is secured by the default Google encryption key. # Optional. Presence indicates CMEK is enabled for this database.
    &quot;activeKeyVersion&quot;: [ # Output only. Currently in-use [KMS key versions](https://cloud.google.com/kms/docs/resource-hierarchy#key_versions). During [key rotation](https://cloud.google.com/kms/docs/key-rotation), there can be multiple in-use key versions. The expected format is `projects/{project_id}/locations/{kms_location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}/cryptoKeyVersions/{key_version}`.
      &quot;A String&quot;,
    ],
    &quot;kmsKeyName&quot;: &quot;A String&quot;, # Required. Only keys in the same location as this database are allowed to be used for encryption. For Firestore&#x27;s nam5 multi-region, this corresponds to Cloud KMS multi-region us. For Firestore&#x27;s eur3 multi-region, this corresponds to Cloud KMS multi-region europe. See https://cloud.google.com/kms/docs/locations. The expected format is `projects/{project_id}/locations/{kms_location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}`.
  },
  &quot;concurrencyMode&quot;: &quot;A String&quot;, # The concurrency control mode to use for this database.
  &quot;createTime&quot;: &quot;A String&quot;, # Output only. The timestamp at which this database was created. Databases created before 2016 do not populate create_time.
  &quot;databaseEdition&quot;: &quot;A String&quot;, # Immutable. The edition of the database.
  &quot;deleteProtectionState&quot;: &quot;A String&quot;, # State of delete protection for the database.
  &quot;deleteTime&quot;: &quot;A String&quot;, # Output only. The timestamp at which this database was deleted. Only set if the database has been deleted.
  &quot;earliestVersionTime&quot;: &quot;A String&quot;, # Output only. The earliest timestamp at which older versions of the data can be read from the database. See [version_retention_period] above; this field is populated with `now - version_retention_period`. This value is continuously updated, and becomes stale the moment it is queried. If you are using this value to recover data, make sure to account for the time from the moment when the value is queried to the moment when you initiate the recovery.
  &quot;etag&quot;: &quot;A String&quot;, # This checksum is computed by the server based on the value of other fields, and may be sent on update and delete requests to ensure the client has an up-to-date value before proceeding.
  &quot;firestoreDataAccessMode&quot;: &quot;A String&quot;, # Optional. The Firestore API data access mode to use for this database. If not set on write: - the default value is DATA_ACCESS_MODE_DISABLED for Enterprise Edition. - the default value is DATA_ACCESS_MODE_ENABLED for Standard Edition.
  &quot;freeTier&quot;: True or False, # Output only. Background: Free tier is the ability of a Firestore database to use a small amount of resources every day without being charged. Once usage exceeds the free tier limit further usage is charged. Whether this database can make use of the free tier. Only one database per project can be eligible for the free tier. The first (or next) database that is created in a project without a free tier database will be marked as eligible for the free tier. Databases that are created while there is a free tier database will not be eligible for the free tier.
  &quot;keyPrefix&quot;: &quot;A String&quot;, # Output only. The key_prefix for this database. This key_prefix is used, in combination with the project ID (&quot;~&quot;) to construct the application ID that is returned from the Cloud Datastore APIs in Google App Engine first generation runtimes. This value may be empty in which case the appid to use for URL-encoded keys is the project_id (eg: foo instead of v~foo).
  &quot;locationId&quot;: &quot;A String&quot;, # The location of the database. Available locations are listed at https://cloud.google.com/firestore/docs/locations.
  &quot;mongodbCompatibleDataAccessMode&quot;: &quot;A String&quot;, # Optional. The MongoDB compatible API data access mode to use for this database. If not set on write, the default value is DATA_ACCESS_MODE_ENABLED for Enterprise Edition. The value is always DATA_ACCESS_MODE_DISABLED for Standard Edition.
  &quot;name&quot;: &quot;A String&quot;, # The resource name of the Database. Format: `projects/{project}/databases/{database}`
  &quot;pointInTimeRecoveryEnablement&quot;: &quot;A String&quot;, # Whether to enable the PITR feature on this database.
  &quot;previousId&quot;: &quot;A String&quot;, # Output only. The database resource&#x27;s prior database ID. This field is only populated for deleted databases.
  &quot;realtimeUpdatesMode&quot;: &quot;A String&quot;, # Immutable. The default Realtime Updates mode to use for this database.
  &quot;sourceInfo&quot;: { # Information about the provenance of this database. # Output only. Information about the provenance of this database.
    &quot;backup&quot;: { # Information about a backup that was used to restore a database. # If set, this database was restored from the specified backup (or a snapshot thereof).
      &quot;backup&quot;: &quot;A String&quot;, # The resource name of the backup that was used to restore this database. Format: `projects/{project}/locations/{location}/backups/{backup}`.
    },
    &quot;operation&quot;: &quot;A String&quot;, # The associated long-running operation. This field may not be set after the operation has completed. Format: `projects/{project}/databases/{database}/operations/{operation}`.
  },
  &quot;tags&quot;: { # Optional. Input only. Immutable. Tag keys/values directly bound to this resource. For example: &quot;123/environment&quot;: &quot;production&quot;, &quot;123/costCenter&quot;: &quot;marketing&quot;
    &quot;a_key&quot;: &quot;A String&quot;,
  },
  &quot;type&quot;: &quot;A String&quot;, # The type of the database. See https://cloud.google.com/datastore/docs/firestore-or-datastore for information about how to choose.
  &quot;uid&quot;: &quot;A String&quot;, # Output only. The system-generated UUID4 for this Database.
  &quot;updateTime&quot;: &quot;A String&quot;, # Output only. The timestamp at which this database was most recently updated. Note this only includes updates to the database resource and not data contained by the database.
  &quot;versionRetentionPeriod&quot;: &quot;A String&quot;, # Output only. The period during which past versions of data are retained in the database. Any read or query can specify a `read_time` within this window, and will read the state of the database at that time. If the PITR feature is enabled, the retention period is 7 days. Otherwise, the retention period is 1 hour.
}

  updateMask: string, The list of fields to be updated.
  x__xgafv: string, V1 error format.
    Allowed values
      1 - v1 error format
      2 - v2 error format

Returns:
  An object of the form:

    { # This resource represents a long-running operation that is the result of a network API call.
  &quot;done&quot;: True or False, # If the value is `false`, it means the operation is still in progress. If `true`, the operation is completed, and either `error` or `response` is available.
  &quot;error&quot;: { # The `Status` type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by [gRPC](https://github.com/grpc). Each `Status` message contains three pieces of data: error code, error message, and error details. You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors). # The error result of the operation in case of failure or cancellation.
    &quot;code&quot;: 42, # The status code, which should be an enum value of google.rpc.Code.
    &quot;details&quot;: [ # A list of messages that carry the error details. There is a common set of message types for APIs to use.
      {
        &quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
      },
    ],
    &quot;message&quot;: &quot;A String&quot;, # A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the google.rpc.Status.details field, or localized by the client.
  },
  &quot;metadata&quot;: { # Service-specific metadata associated with the operation. It typically contains progress information and common metadata such as create time. Some services might not provide such metadata. Any method that returns a long-running operation should document the metadata type, if any.
    &quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
  },
  &quot;name&quot;: &quot;A String&quot;, # The server-assigned name, which is only unique within the same service that originally returns it. If you use the default HTTP mapping, the `name` should be a resource name ending with `operations/{unique_id}`.
  &quot;response&quot;: { # The normal, successful response of the operation. If the original method returns no data on success, such as `Delete`, the response is `google.protobuf.Empty`. If the original method is standard `Get`/`Create`/`Update`, the response should be the resource. For other methods, the response should have the type `XxxResponse`, where `Xxx` is the original method name. For example, if the original method name is `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`.
    &quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
  },
}</pre>
</div>

<div class="method">
    <code class="details" id="restore">restore(parent, body=None, x__xgafv=None)</code>
  <pre>Creates a new database by restoring from an existing backup. The new database must be in the same cloud region or multi-region location as the existing backup. This behaves similar to FirestoreAdmin.CreateDatabase except instead of creating a new empty database, a new database is created with the database type, index configuration, and documents from an existing backup. The long-running operation can be used to track the progress of the restore, with the Operation&#x27;s metadata field type being the RestoreDatabaseMetadata. The response type is the Database if the restore was successful. The new database is not readable or writeable until the LRO has completed.

Args:
  parent: string, Required. The project to restore the database in. Format is `projects/{project_id}`. (required)
  body: object, The request body.
    The object takes the form of:

{ # The request message for FirestoreAdmin.RestoreDatabase.
  &quot;backup&quot;: &quot;A String&quot;, # Required. Backup to restore from. Must be from the same project as the parent. The restored database will be created in the same location as the source backup. Format is: `projects/{project_id}/locations/{location}/backups/{backup}`
  &quot;databaseId&quot;: &quot;A String&quot;, # Required. The ID to use for the database, which will become the final component of the database&#x27;s resource name. This database ID must not be associated with an existing database. This value should be 4-63 characters. Valid characters are /a-z-/ with first character a letter and the last a letter or a number. Must not be UUID-like /[0-9a-f]{8}(-[0-9a-f]{4}){3}-[0-9a-f]{12}/. &quot;(default)&quot; database ID is also valid if the database is Standard edition.
  &quot;encryptionConfig&quot;: { # Encryption configuration for a new database being created from another source. The source could be a Backup . # Optional. Encryption configuration for the restored database. If this field is not specified, the restored database will use the same encryption configuration as the backup, namely use_source_encryption.
    &quot;customerManagedEncryption&quot;: { # The configuration options for using CMEK (Customer Managed Encryption Key) encryption. # Use Customer Managed Encryption Keys (CMEK) for encryption.
      &quot;kmsKeyName&quot;: &quot;A String&quot;, # Required. Only keys in the same location as the database are allowed to be used for encryption. For Firestore&#x27;s nam5 multi-region, this corresponds to Cloud KMS multi-region us. For Firestore&#x27;s eur3 multi-region, this corresponds to Cloud KMS multi-region europe. See https://cloud.google.com/kms/docs/locations. The expected format is `projects/{project_id}/locations/{kms_location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}`.
    },
    &quot;googleDefaultEncryption&quot;: { # The configuration options for using Google default encryption. # Use Google default encryption.
    },
    &quot;useSourceEncryption&quot;: { # The configuration options for using the same encryption method as the source. # The database will use the same encryption configuration as the source.
    },
  },
  &quot;tags&quot;: { # Optional. Immutable. Tags to be bound to the restored database. The tags should be provided in the format of `tagKeys/{tag_key_id} -&gt; tagValues/{tag_value_id}`.
    &quot;a_key&quot;: &quot;A String&quot;,
  },
}

  x__xgafv: string, V1 error format.
    Allowed values
      1 - v1 error format
      2 - v2 error format

Returns:
  An object of the form:

    { # This resource represents a long-running operation that is the result of a network API call.
  &quot;done&quot;: True or False, # If the value is `false`, it means the operation is still in progress. If `true`, the operation is completed, and either `error` or `response` is available.
  &quot;error&quot;: { # The `Status` type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by [gRPC](https://github.com/grpc). Each `Status` message contains three pieces of data: error code, error message, and error details. You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors). # The error result of the operation in case of failure or cancellation.
    &quot;code&quot;: 42, # The status code, which should be an enum value of google.rpc.Code.
    &quot;details&quot;: [ # A list of messages that carry the error details. There is a common set of message types for APIs to use.
      {
        &quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
      },
    ],
    &quot;message&quot;: &quot;A String&quot;, # A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the google.rpc.Status.details field, or localized by the client.
  },
  &quot;metadata&quot;: { # Service-specific metadata associated with the operation. It typically contains progress information and common metadata such as create time. Some services might not provide such metadata. Any method that returns a long-running operation should document the metadata type, if any.
    &quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
  },
  &quot;name&quot;: &quot;A String&quot;, # The server-assigned name, which is only unique within the same service that originally returns it. If you use the default HTTP mapping, the `name` should be a resource name ending with `operations/{unique_id}`.
  &quot;response&quot;: { # The normal, successful response of the operation. If the original method returns no data on success, such as `Delete`, the response is `google.protobuf.Empty`. If the original method is standard `Get`/`Create`/`Update`, the response should be the resource. For other methods, the response should have the type `XxxResponse`, where `Xxx` is the original method name. For example, if the original method name is `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`.
    &quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
  },
}</pre>
</div>

</body></html>